package cn.tedu.finance.service.impl;

import cn.tedu.finance.mapper.ReimbursementMapper;
import cn.tedu.finance.pojo.dto.ReimbursementQuery;
import cn.tedu.finance.pojo.dto.ReimbursementSaveParam;
import cn.tedu.finance.pojo.vo.ReimbursementVO;
import cn.tedu.finance.service.ReimbursementService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Slf4j
@Service
public class ReimbursementServiceImpl implements ReimbursementService {
    @Autowired
    ReimbursementMapper reimbursementMapper;



    @Override
    public List<ReimbursementVO> selectReimbusement(ReimbursementQuery reimbursementQuery) {
        log.debug("查询报销申请业务：{}", reimbursementQuery);
        List<ReimbursementVO> list = reimbursementMapper.selectReimbusement(reimbursementQuery);
        return list;
    }

    @Override
    public void saveReimbursement(ReimbursementSaveParam reimbursementSaveParam) {
        log.debug("保存报销申请业务：{}", reimbursementSaveParam);
        reimbursementMapper.saveReimbursement(reimbursementSaveParam);
    }

    @Override
    public void cancelApplication(Long id) {
        log.debug("取消报销申请业务：{}", id);
        reimbursementMapper.cancelApplication(id);
    }


}
